package com.youtills.resource.date;

import com.youtills.action.ActionContext;
import com.youtills.resource.DateManager;

import java.util.Date;


/**
 * TODO - !!!doc me!!!
 *
 * @author ravi.chiluveru
 * @since (05 Mar 2015)
 */
public class SystemDateManager  implements DateManager {

    public static SystemDateManager instance = new SystemDateManager();

    public static SystemDateManager getInstance() {
        return instance;
    }

    private SystemDateManager() {
    }

    @Override
    public Date getCurrentDate(final ActionContext ac) {
        return new Date(getCurrentTimeMillis(ac));
    }

    @Override
    public long getCurrentTimeMillis(final ActionContext ac) {
        return System.currentTimeMillis();
    }
}

